﻿@model TracNghiem.Areas.Admin.Models.Test_SubjectModel
<div class="container_12">       
    <div class="grid_12">            
        <div class="module">
                <h2 align="right"><span><a href="@Url.Action("Index", "Test_Subject")">Quay lại</a></span></h2>                       
                <div class="module-body">
                @using (Html.BeginForm("EditTest_Subject", "Test_Subject", FormMethod.Post, new { id = "Test_Subject" }))
                {                      
                    <div align="center"><h3>SỬA CHỦ ĐỀ TRẮC NGHIỆM</h3>
                        @*<div class="account" align="center"> 
                            <img src="@Url.Content("~/Content/themes/template/image//Body_Images/Add_User.png")" width="12%" />
                        </div>*@
                    </div>
                    if (TempData["msg"] != null)
                    {                            
                        <span class="notification n-error">@TempData["msg"]</span>
                    }  
                    <p></p>
                    <table> 
                            <p>
                                <label style="padding-left: 30%;">Dịch vụ:</label> 
                                <div style="padding-left: 28%;"> 
                                    @if (Model.service_id != null)
                                    {                               
                                        @Html.DropDownListFor(x => x.dichvu_id, Model.service_id, new { style = "margin-left:17px" })  
                                    }
                                </div>                          
                            </p> 
                            <p>
                                <label style="padding-left: 30%;">Tên chủ đề:</label>
                                <div style="padding-left: 30%;">
                                    @*@Html.TextBoxFor(model => model.name, new { @name = "name", @class = "input-medium" }) *@
                                    @Html.TextArea("name", Model.name, new { rows = 2, @class = "input-long" })
                                    <font color="red">(*)</font>
                                    <label style="width:56%; text-align:left;color:red">
                                        @Html.ValidationMessageFor(model => model.name)
                                    </label>
                                </div>                                                
                            </p>  
                            <p>
                                <label style="padding-left: 30%;">Thời gian làm mỗi câu (giây):</label>
                                <div style="padding-left: 30%;">                                    
                                    @Html.TextBoxFor(model => model.thoi_gian)
                                    <font color="red">(*)</font>
                                    <label style="width:56%; text-align:left;color:red">
                                        @Html.ValidationMessageFor(model => model.thoi_gian)
                                    </label>
                                </div>                                                
                            </p> 
                            <p>
                                <label style="padding-left: 30%;">Số câu kiểm tra:</label>
                                <div style="padding-left: 30%;">                                    
                                    @Html.TextBoxFor(model => model.so_cau)
                                    <font color="red">(*)</font>
                                    <label style="width:56%; text-align:left;color:red">
                                        @Html.ValidationMessageFor(model => model.so_cau)
                                    </label>
                                </div>                                                
                            </p>  
                            <p>
                                <label style="padding-left: 30%;">Ghi chú:</label>
                                <div style="padding-left: 30%;">
                                    @Html.TextArea("ghi_chu", Model.ghi_chu, new { rows = 3, @class = "input-long" })
                                    @*@Html.TextBoxFor(model => model.ghi_chu, new { @name = "ghi_chu", @class = "input-medium" })*@
                                </div>
                            </p>
                            <p> 
                                <label style="padding-left: 30%;">Trạng thái:</label>
                                <div style="padding-left: 30%;">
                                    <select name="status">
                                        <option value="1" @(Model.status == "Bình thường" ? "selected=selected" : "")>Bình thường</option>
                                        <option value="0" @(Model.status == "Khóa" ? "selected=selected" : "")>Khóa</option>                            
                                    </select>                                        
                                </div>    
                            </p>                            
                            <p> 
                                <label style="padding-left: 30%;">Ngày kết thúc:</label>
                                <div style="padding-left: 30%;">
                                    @Html.TextBoxFor(model => model.ngay_ket_thuc, new { id = "date" })                                    
                                </div>
                            </p>
                            
                        
                    </table>
                    <div class="button" align="center">
                        <p style="width:26%; text-align:center">
                            <input class="submit-green" type="submit" value="Sửa"/> 
                            <input class="submit-gray" type="reset" value="Hủy" />
                            
                        </p>
                    </div>
                }
                </div> <!-- End .module-body -->
        </div>  <!-- End .module -->
        <div style="clear:both;"></div>
    </div> <!-- End .grid_12 --> 
    <div style="clear:both;"></div>
</div> <!-- End .container_12 -->
<script type="text/javascript">
    $(document).ready(function () {
        $("#date").datepicker({ dateFormat: 'dd/mm/yy' });
    });
</script>